﻿@inherits DrawerTemplate<int, bool>

<Form Loading="@_isLoading"
      Model="@_editModel"
      LabelCol="new ColLayoutParam { Span = 8 }"
      WrapperCol="new ColLayoutParam { Span = 16 }"
      OnFinish="OnFormFinish"
      Context="model">
    <FormItem Label="名称">
        <Input @bind-Value="@model.Name" />
    </FormItem>
    <FormItem Label="备注">
        <TextArea AutoSize="true" MinRows="2" MaxRows="6" @bind-Value="@model.Remark"></TextArea>
    </FormItem>
    <FormItem Label="是否是超级管理员">
        <Switch @bind-Value="@model.IsSuperAdministrator"></Switch>
    </FormItem>
    <FormItem Label="是否是默认角色">
        <Switch @bind-Value="@model.IsDefault"></Switch>
    </FormItem>
    <FormItem Label="是否锁定">
        <Switch @bind-Value="@model.IsLocked"></Switch>
    </FormItem>
    <FormItem WrapperCol="new ColLayoutParam { Offset = 4, Span = 20 }">
        <Button Type="@ButtonType.Primary" HtmlType="submit">
            保存
        </Button>
        <Button OnClick="_=>OnFormCancel()">
            取消
        </Button>
    </FormItem>
</Form>